import request from "@/utils/request";
// 获取所有的商品分类信息
export function getCategory(data) {
  return request({
    url: "/api/v1/admin/product_categories",
    method: "get",
    params: data,
  });
}
//新增商品
export function addCategory(data) {
  return request({
    url: "/api/v1/admin/product_categories",
    method: "post",
    data,
  });
}
//删除
export function delCategory(id) {
  return request({
    url: "/api/v1/admin/product_categories/" + id,
    method: "delete",
  });
}
//修改
export function editCategoty(id, data) {
  return request({
    url: "/api/v1/admin/product_categories/" + id,
    method: "put",
    data,
  });
}
